import * as API from '@/api/common/index.js'
import axios from 'axios'

export async function getSupplierApi(params) {              //获取供应商列表接口
    return  await API.GET("/v1/flash/suppliers",params)
};

export async function addSupplierApi(params) {              //新增供应商列表接口
    return  await API.POST("/v1/flash/suppliers",params)
};

export async function editSupplierApi(params) {              //修改供应商信息接口
    return  await API.PUT("/v1/flash/suppliers",params)
};



export async function getMent(params) {              //查询设备品类管理页面
    return  await API.GET("/v1/flash/equipment/category",params)
};
export async function editMent(params) {              //修改设备品类管理页面
    return  await API.PUT("/v1/flash/equipment/category",params)
};
export async function addMent(params) {              //新增设备品类管理页面
    return  await API.POST("/v1/flash/equipment/category",params)
};



export async function getSignal(params) {              //获取通信模块管理页面
    return  await API.GET("/v1/flash/module",params)
};
export async function editSignal(params) {              //修改通信模块管理页面
    return  await API.PUT("/v1/flash/module",params)
};
export async function addSignal(params) {              //修改通信模块管理页面
    return  await API.POST("/v1/flash/module",params)
};
export async function exportSignal(params) {              //通信模块管理页面到处表格
    return  await API.GET("/v1/flash/module/template/export",params,"blob")
};
export async function postexportSignal(params) {              //通信模块管理页面到处表格
    return  await API.POST("/v1/flash/module/template/import",params,"blob")
};


export async function getTerminal(params) {              //终端设备管理查询,isbinding=>1是终端,0是库存
    return  await API.GET("/v1/flash/equipments",params)
};

export async function getTerminalBySn(params) {              //终端设备管理查询,isbinding=>1是终端,0是库存
    return  await API.GET("/v1/flash/equipments/"+params)
};

export async function exportTerminal(params) {              //终端设备管理导出
    return  await API.GET("/v1/flash/equipments/template/export",params,"blob")
};
export async function editTerminal(params) {              //终端设备管理修改
    return  await API.PUT("/v1/flash/equipments",params)
};
export async function editTerminalOnline(params) {              //终端设备管理修改
    return  await API.PUT("/v1/flash/equipments/online",params)
};

export async function getShop(params) {              //获取门店信息
    return  await API.GET("/v1/flash/stores",params)
};

export async function addStore(params) {              //新增库存管理
    return  await API.POST("/v1/flash/equipments",params,"blob")
};
